/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.buanalintas.sandals.pos.reminder;

import com.buanalintas.bynga.Action;
import com.buanalintas.bynga.Dictionary;
import com.buanalintas.bynga.Field;
import com.buanalintas.bynga.Page;
import com.buanalintas.bynga.formatter.NumberFormatter;
import com.buanalintas.sandals.pos.entities.ViewRememberPay;

/**
 *
 * @author user
 */
public class PayReminder extends Page{
    private Field receiptNumber;
    private Field receiptTotal;
    private Field giro1;
    private Field nominal1;
    private Field giro2;
    private Field nominal2;
    private Field giro3;
    private Field nominal3;
    private Field giro4;
    private Field nominal4;
    private Field giro5;
    private Field nominal5;
    private Field cash;

    private Action actionShow = new Action("show", "Show reminder");
    private Action actionExport = new Action("export", "Export reminder");
     private static String MESSAGE_DEX = "<!--MESSAGE-DEX-->";
    private static String SELECT_DEX_VALUES = "<!--SELECT-DEX-VALUES-->";
    private static String RECAP_EXPORT = "RECAP-EXPORT";
    private static String RECAP_EXPORT_LINK = "<!--RECAP-EXPORT-LINK-->";
    private static String RECAP_EXPORT_IMAGE = "<!--RECAP-EXPORT-IMAGE-->";
    private static String RECORD = "<!--RECORD-->";
    private static String LIST_DATA = "<!--LIST-DATA-->";
    private static String BUTTON_SEARCH = "<!--BUTTON-SEARCH-->";
    private static String MESSAGE_DAILY = "<!--MESSAGE-DAILY-->";
    private static String MESSAGE_WEEKLY = "<!--MESSAGE-WEEKLY-->";
    private static String MESSAGE_MONTHLY_YEAR = "<!--MESSAGE-MONTHLY-YEAR-->";
    private static String MESSAGE_MONTHLY_MONTH = "<!--MESSAGE-MONTHLY-MONTH-->";
    private static String MESSAGE_YEARLY = "<!--MESSAGE-YEARLY-->";
    private static String MESSAGE_CUSTOM = "<!--MESSAGE-CUSTOM-->";
    private static String SELECT_MODE = "<!--SELECT-MODE-->";
    private static String SELECT_MODE_ONCHANGE = "<!--SELECT-MODE-ONCHANGE-->";
    private static String SELECT_VALUES = "<!--SELECT-VALUES-->";
    private static String SELECT_DEX = "<!--SELECT-DEX-->";
    private static String MODE_DAILY = "MODE-DAILY";
    private static String DAILY_SELECT_DATE = "<!--DAILY-SELECT-DATE-->";
    private static String DAILY_DATE_VALUE = "<!--DAILY-DATE-VALUE-->";
    private static String MODE_WEEKLY = "MODE-WEEKLY";
    private static String WEEKLY_START_DATE_VALUE = "<!--WEEKLY-START-DATE-VALUE-->";
    private static String WEEKLY_SELECT_START_DATE = "<!--WEEKLY-SELECT-START-DATE-->";
    private static String MODE_MONTHLY = "MODE-MONTHLY";
    private static String MONTHLY_SELECT_YEAR = "<!--MONTHLY-SELECT-YEAR-->";
    private static String MONTHLY_SELECT_YEAR_VALUES = "<!--MONTHLY-SELECT-YEAR-VALUES-->";
    private static String MONTHLY_SELECT_MONTH = "<!--MONTHLY-SELECT-MONTH-->";
    private static String MONTHLY_SELECT_MONTH_VALUES = "<!--MONTHLY-SELECT-MONTH-VALUES-->";
    private static String MODE_YEARLY = "MODE-YEARLY";
    private static String YEARLY_SELECT_YEAR = "<!--YEARLY-SELECT-YEAR-->";
    private static String YEARLY_SELECT_YEAR_VALUES = "<!--YEARLY-SELECT-YEAR-VALUES-->";
    private static String MODE_CUSTOM = "MODE-CUSTOM";
    private static String CUSTOM_SELECT_START_DATE = "<!--CUSTOM-SELECT-START-DATE-->";
    private static String CUSTOM_START_DATE_VALUE = "<!--CUSTOM-START-DATE-VALUE-->";
    private static String CUSTOM_SELECT_END_DATE = "<!--CUSTOM-SELECT-END-DATE-->";
    private static String CUSTOM_END_DATE_VALUE = "<!--CUSTOM-END-DATE-VALUE-->";
    private static String WARNING = "<!--WARNING-->";
    private static String TOTAL = "TOTAL";
    private static String TOTAL_CAPTION = "<!--TOTAL-CAPTION-->";
    private static String TOTAL_TEXT = "<!--TOTAL-TEXT-->";
    private NumberFormatter stockFormatter;

    public PayReminder() {
       setTheClass(ViewRememberPay.class);
       
        receiptNumber = new Field();
        receiptNumber.setName("receiptNumber");
        receiptNumber.setCaption("receipt");
        receiptNumber.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        receiptNumber.setInputProperties(" ");
        receiptNumber.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(receiptNumber);
        
        receiptTotal = new Field();
        receiptTotal.setName("receiptTotal");
        receiptTotal.setCaption("receipt total");
        receiptTotal.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        receiptTotal.setInputProperties(" ");
        receiptTotal.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(receiptTotal);
        
        cash = new Field();
        cash.setName("cash");
        cash.setCaption("cash");
        cash.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        cash.setInputProperties(" ");
        cash.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(cash);
        
        giro1 = new Field();
        giro1.setName("giro1");
        giro1.setCaption("giro 1");
        giro1.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        giro1.setInputProperties(" ");
        giro1.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(giro1);
        
        nominal1 = new Field();
        nominal1.setName("nominal1");
        nominal1.setCaption("nominal");
        nominal1.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        nominal1.setInputProperties(" ");
        nominal1.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(nominal1);
        
        giro2 = new Field();
        giro2.setName("giro2");
        giro2.setCaption("giro 2");
        giro2.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        giro2.setInputProperties(" ");
        giro2.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(giro2);
        
        nominal2 = new Field();
        nominal2.setName("nominal2");
        nominal2.setCaption("nominal");
        nominal2.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        nominal2.setInputProperties(" ");
        nominal2.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(nominal2);
        
        giro3 = new Field();
        giro3.setName("giro3");
        giro3.setCaption("giro 3");
        giro3.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        giro3.setInputProperties(" ");
        giro3.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(giro3);
        
        nominal3 = new Field();
        nominal3.setName("nominal3");
        nominal3.setCaption("nominal");
        nominal3.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        nominal3.setInputProperties(" ");
        nominal3.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(nominal3);
        
        giro4 = new Field();
        giro4.setName("giro4");
        giro4.setCaption("giro 4");
        giro4.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        giro4.setInputProperties(" ");
        giro4.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(giro3);
        
        nominal4 = new Field();
        nominal4.setName("nominal4");
        nominal4.setCaption("nominal");
        nominal4.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        nominal4.setInputProperties(" ");
        nominal4.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(nominal4);
        
        giro5 = new Field();
        giro5.setName("giro5");
        giro5.setCaption("giro 5");
        giro5.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        giro5.setInputProperties(" ");
        giro5.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(giro5);
        
        nominal5 = new Field();
        nominal5.setName("nominal5");
        nominal5.setCaption("nominal");
        nominal5.setListProperties(" align=\"center\" width=\"8%\" nowrap");
        nominal5.setInputProperties(" ");
        nominal5.setRequired(true);
//        colorName.setInputType(Field.INPUT_COMBO_BOX);
        getFields().add(nominal5);
        
        fillFields();
        
        setExportList(getClass().getResourceAsStream("PaymentList.jasper"));
        setExport(getClass().getResourceAsStream("Payment.jasper"));
    }
    
    @Override
    public void beforeExport() {
        getExportParams().put("title", Dictionary.getValue(this, "Remminder Payment"));
    }

    @Override
    public void beforeExportMulti() {
        beforeExport();
    }
}
